package com.dtx.datastruct.array;

public class ArrayDemo {
    public static void main(String[] args) {
        Array array = new Array(4);
        System.out.println(array.getArray().length);
        Entity entity = new Entity("name",16,1);
        Entity entity1 = new Entity("name1",17,2);
        Entity entity2 = new Entity("name2",16,3);
        Entity entity3 = new Entity("name3",16,4);
        Entity entity4 = new Entity("name4",16,5);
        array.add(entity);
        array.add(entity1);
        array.add(entity2);
        array.list();
        System.out.println("元素添加前的列表");
        array.insert(entity3,2);
        System.out.println("============================");
        array.list();
        Entity del = array.del(3);
        System.out.println("删除的元素是"+del);
        System.out.println("删除后的列表");
        array.list();
        array.add(entity4);

    }
}
